@import "../../../base.less";

@import "./_var.less";

.@{action-sheet} {
  &__content {
    color: @action-sheet-color;
    border-top-left-radius: @action-sheet-border-radius;
    border-top-right-radius: @action-sheet-border-radius;
    background-color: @bg-color-container;
    overflow: hidden;

    &--grid {
      padding-top: 8px;
    }

    &:focus {
      outline: 0;
    }
  }
  .flex-center() {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .ellipsis() {
    word-wrap: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  &__grid {
    padding-bottom: 8px;

    &--swiper {
      padding-bottom: 0;
    }
  }

  &__description {
    color: @action-sheet-description-color;
    line-height: 22px;
    font-size: 14px;
    text-align: @action-sheet-text-align;
    padding: 12px 16px;
    .border(bottom, @action-sheet-border-color);

    &--left {
      text-align: left;

      &::after {
        left: 16px;
      }
    }

    &--grid {
      line-height: 34px;

      &::after {
        display: none;
      }
    }
  }

  &__list {
    &-item {
      border: none;
      height: @action-sheet-list-item-height;
      padding: 0 16px;
      .border(bottom, @action-sheet-border-color);
      .flex-center();

      &--left {
        justify-content: start;
        text-align: left;

        &::after {
          left: 16px;
        }
      }

      &--disabled {
        --el-button-default-disabled-bg: none;
        --el-button-default-disabled-color: @action-sheet-list-item-disabled-color;
      }

      &-text {
        font-size: @font-size-m;
        font-weight: @action-sheet-text-weight;
        .ellipsis();
      }

      &-icon {
        margin-right: 8px;
      }
    }
  }

  &__swiper-wrap {
    margin-top: 8px;
    padding-bottom: 24px;
    position: relative;

    .@{prefix}-swiper__pagination {
      .@{prefix}-swiper-dot {
        background-color: @action-sheet-dot-color;

        &--active {
          background-color: @action-sheet-dot-active-color;
        }
      }
    }
  }

  &__footer {
    background-color: @bg-color-container;
  }

  &__gap-list {
    height: 8px;
    background-color: @action-sheet-gap-color;
  }

  &__gap-grid {
    height: .5px;
    background-color: @action-sheet-gap-color;
  }

  &__cancel {
    height: @action-sheet-cancel-height;
    border: none;
    border-radius: 0;
    font-weight: @action-sheet-text-weight;
    .flex-center();

    &::after {
      border-radius: 0;
    }
  }

  &__dots {
    --el-swiper-nav-dot-color: @action-sheet-dot-color;
    --el-swiper-nav-dot-size: @action-sheet-dot-size;
    --el-swiper-nav-dot-active-color: @action-sheet-dot-active-color;
  }
}
